Class ShortestPath

java.lang.Object
edu.claflin.finder.algo.Algorithm
edu.claflin.finder.algo.shortestpath.ShortestPath
All Implemented Interfaces:
Processable<Graph,Graph>

public class ShortestPath extends Algorithm
  • Constructor Details

    • ShortestPath

      public ShortestPath(ArgumentsBundle bundle)
      Public Constructor for creating Shortest Path Algorithm.
      Parameters:
      bundle - the ArgumentsBundle containing the arguments for the Algorithm object.
  • Method Details

    • process

      public ArrayList<Graph> process(Graph graph)
      Description copied from interface: Processable
      Processes data.
      Parameters:
      graph - the T type object to process.
      Returns:
      the S type object array produced by the processing.
    • removePaths

      private Graph removePaths(Graph graph, Node from, Node to)
      Private class for removing visited paths that not reach the destination node.
      Parameters:
      graph - the graph containing the shortest path with extra paths Algorithm object.
      from - starting Node
      to - ending Node
      Returns:
      the Graph without fake visited paths